clear all
set more off

global chemin "HERE indicated path to the main folder"
cd "$chemin\data"

use final_IHME22, clear
drop if recipient_name == "Unallocated/Unspecified"
* we drop 2019 and 2020 because we don't have bilateral data but just global data
drop if year >= 2019
gen MCP = 0
replace MCP = 1 if year <1993 /* actif jusqu'en 12/1992 inclus */
replace MCP = 1 if year == 1995
replace MCP = 1 if year >1999 & year <2009 /* actif en 1999/2000 et à partir du 01/2001 jusqu'en 12/2008*/
replace MCP = 1 if year >2016 /*actif 01/2017 - 12/2020*/ 


* Intsrument construction
	* Part 1 : probability of receiving FP aid when MCP is not active
	gen aid_pc = (rmh_fp_dah_20_US >0)
	bys recipient_name : egen aid = mean(aid_pc) if MCP == 0
	bys recipient_name : egen FPr = mean(aid)

* instrument 1 : Probability of receiving FP aid when MCP is not active * share channelled through NGO during OBAMA term * policy
	gen instrument1 = FPr * share_NGOUS_Obama * MCP
* instrument 2 : Probability of receiving FP aid when MCP is not active * share channelled through NGO when MCP not active * policy
	gen instrument2 = FPr * share_NGOUS_MCP * MCP

* Creation of controls
	gen lngdppc = ln(GDPpc_r)
	gen lnpopr = ln(pop_r)
	gen laidfp = ln(rmh_fp_dah_20 + ((rmh_fp_dah_20^2 +1)^0.5))
	gen laidUS = ln(rmh_fp_dah_20_US + ((rmh_fp_dah_20_US^2 +1)^0.5))

	gen laidfp2 = ln(rmh_fp_dah_20 + 1)
	gen laidUS2 = ln(rmh_fp_dah_20_US + 1)

	egen id_o = group(donor)
	egen id_dr = group(donor recipient_name)
	egen id_r = group( recipient_name)
	gen fert2 = fertility_r *fertility_r

xtset id_dr year
global controls  lngdppc lnpopr poverty_r
global controls1 lngdppc lnpopr poverty_r life_expectencyfe_r incidenceHIV_r HIV1549_r fert2 fertility_r adofertility_r maternalmortality_r
global controls2 lngdppc lnpopr poverty_r life_expectencyfe_r incidenceHIV_r HIV1549_r fert2 fertility_r adofertility_r maternalmortality_r polity2
global controls3 lngdppc lnpopr poverty_r life_expectencyfe_r incidenceHIV_r HIV1549_r fert2 fertility_r adofertility_r maternalmortality_r polity2 UN_dr 

* controls interacted with FPr*ShareNGOr
foreach i of varlist $controls3 {
	gen `i'_int = `i' * FPr * share_NGOUS_Obama
}


* Défeinition of different set of controls 
global controlsi  L.lngdppc* L.lnpopr* L.poverty_r*    																				
global controls1i L.lngdppc* L.lnpopr* L.poverty_r* L.life_expectencyfe_r* L.HIV1549_r* L.incidenceHIV_r* L.fert2* L.fertility* L.adofertility* L.maternalmortality_r*
global controls2i L.lngdppc* L.lnpopr* L.poverty_r* L.life_expectencyfe_r* L.HIV1549_r* L.incidenceHIV_r* L.fert2* L.fertility* L.adofertility* L.maternalmortality_r* L.polity2* 
* will exclude the EU and the BMGF because no data on UN vote...
global controls3i L.lngdppc* L.lnpopr* L.poverty_r* L.life_expectencyfe_r* L.HIV1549_r* L.incidenceHIV_r* L.fert2* L.fertility* L.adofertility* L.maternalmortality_r* L.polity2* L.UN_dr* 


label variable laidUS "Log of US FP aid\$_{rt-1}$"
label variable instrument1 "MCP\$_{t}$ * FP\$_{r}$ * shareONG\$_{r}$"

/* Baseline results*/
ivreghdfe laidfp $controls2i (laidUS =instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
gen in_sample4 =e(sample)
est store Baseline

ivreghdfe laidfp $controls2i (laidUS =instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baseline0
ivreghdfe laidfp $controls2i (L1.laidUS =L1.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baseline1
ivreghdfe laidfp $controls2i (L2.laidUS =L2.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baseline2
ivreghdfe laidfp $controls2i (L3.laidUS =L3.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baseline3



**# Bookmark #4
	* extensive margin
	gen aid01 = (rmh_fp_dah_20>0)
	replace aid01 = . if rmh_fp_dah_20 == .
	gen aid01_US = (rmh_fp_dah_20_US>0)
	replace aid01_US = . if rmh_fp_dah_20_US == .
	ivreghdfe aid01 $controls2i (aid01_US=instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensive0
	estadd local DRFE "Yes": extensive0
	estadd local DYFE "Yes": extensive0
	estadd local Cont "Yes": extensive0
	
	ivreghdfe aid01 $controls2i (laidUS=instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensivebis0
	estadd local DRFE "Yes": extensivebis0
	estadd local DYFE "Yes": extensivebis0
	estadd local Cont "Yes": extensivebis0
		
	ivreghdfe aid01 $controls2i (L.aid01_US=L.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensive1
	estadd local DRFE "Yes": extensive1
	estadd local DYFE "Yes": extensive1
	estadd local Cont "Yes": extensive1
	
	ivreghdfe aid01 $controls2i (L.laidUS=L.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensivebis1
	estadd local DRFE "Yes": extensivebis1
	estadd local DYFE "Yes": extensivebis1
	estadd local Cont "Yes": extensivebis1
	
	
	ivreghdfe aid01 $controls2i (L2.aid01_US=L2.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensive2
	estadd local DRFE "Yes": extensive2
	estadd local DYFE "Yes": extensive2
	estadd local Cont "Yes": extensive2
	
	ivreghdfe aid01 $controls2i (L2.laidUS=L2.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensivebis2
	estadd local DRFE "Yes": extensivebis2
	estadd local DYFE "Yes": extensivebis2
	estadd local Cont "Yes": extensivebis2
	
	ivreghdfe aid01 $controls2i (L3.aid01_US=L3.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensive3
	estadd local DRFE "Yes": extensive3
	estadd local DYFE "Yes": extensive3
	estadd local Cont "Yes": extensive3
	
	ivreghdfe aid01 $controls2i (L3.laidUS=L3.instrument1),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
	est store extensivebis3
	estadd local DRFE "Yes": extensivebis3
	estadd local DYFE "Yes": extensivebis3
	estadd local Cont "Yes": extensivebis3
	
**# Bookmark #2  Faire tableau marges extensive

esttab  extensive*, starlevels(* 0.10 ** 0.05 *** 0.01) keep(aid01_US laidUS L.aid01_US L.laidUS L2.aid01_US L2.laidUS L3.aid01_US L3.laidUS)  
	
	esttab extensiveb* extensive0 extensive1 extensive2 extensive3  using "..\output\extensivereviewer.tex" ,  replace ///
	drop(* )  ///
	b(a2) se(a2) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	substitute($ \$ ) /// /* Formatting label */
	nonumber  nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  /// /* some options on formatings */
	mgroups("=1 if donor \$d$ allocates FP aid to recipient \$r$ at time \$t$" , pattern(1 0 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) nomtitles
		
	
	
	esttab extensiveb* extensive0 extensive1 extensive2 extensive3  using "..\output\extensivereviewer.tex" ,  append ///
	drop(* )  ///
	b(a3) se(a3) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	substitute($ \$ ) /// /* Formatting label */
	nonumber  nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  /// /* some options on formatings */
	mtitles("(1)" "(2)" "(3)" "(4)" "(5)" "(6)" "(7)" "(8)")
	
	esttab extensiveb* extensive0 extensive1 extensive2 extensive3  using "..\output\extensivereviewer.tex" ,  append ///
	keep(aid01_US laidUS L.aid01_US L.laidUS L2.aid01_US L2.laidUS L3.aid01_US L3.laidUS)  ///
	b(a3) se(a3) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	  substitute($ \$ ) /// /* Formatting label */
	coeflabel( ///
	   laidUS "USFPaid\$_{rt}$" ///
	L.laidUS "USFPaid\$_{rt-1}$" ///
	L2.laidUS "USFPaid\$_{rt-2}$" ///
	L3.laidUS "USFPaid\$_{rt-3}$" ///
	aid01_US "USFPaid01\$_{rt}$" ///
	L.aid01_US "USFPaid01\$_{rt-1}$" ///
	L2.aid01_US "USFPaid01\$_{rt-2}$" ///
	L3.aid01_US "USFPaid01\$_{rt-3}$" ///
	) ///
	nonumber compress nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  nomtitles /// /* some options on formatings */
	scalars("N Obs." "df_a_nested Donor-recipient pair" "widstat K-P. F-Stat" ///
	"DRFE Donor-Recipient FE" ///
	"DYFE Donor-Year FE" ///
	"Cont Controls\$_{rt-1}$")  sfmt(a3) 
	
ivreghdfe laidfp $controls2i (laidUS =instrument1 ),  absorb(id_dr i.year##i.id_o##i.wb_location_id)  cluster(recipient_name donor) first
est store Baselinet0
estadd local DRFE "Yes": Baselinet0
estadd local DYFE "Yes": Baselinet0
estadd local DFE  "Yes": Baselinet0
estadd local Cont "Yes": Baselinet0
ivreghdfe laidfp $controls2i (L1.laidUS =L1.instrument1 ),  absorb(id_dr i.year##i.id_o##i.wb_location_id)  cluster(recipient_name donor) first
est store Baselinet1
estadd local DRFE "Yes": Baselinet1
estadd local DYFE "Yes": Baselinet1
estadd local DFE  "Yes": Baselinet1
estadd local Cont "Yes": Baselinet1
ivreghdfe laidfp $controls2i (L2.laidUS =L2.instrument1 ),  absorb(id_dr i.year##i.id_o##i.wb_location_id)  cluster(recipient_name donor) first
est store Baselinet2
estadd local DRFE "Yes": Baselinet2
estadd local DYFE "Yes": Baselinet2
estadd local DFE  "Yes": Baselinet2
estadd local Cont "Yes": Baselinet2
ivreghdfe laidfp $controls2i (L3.laidUS =L3.instrument1 ),  absorb(id_dr i.year##i.id_o##i.wb_location_id)  cluster(recipient_name donor) first
est store Baselinet3
estadd local DRFE "Yes": Baselinet3
estadd local DYFE "Yes": Baselinet3
estadd local DFE  "Yes": Baselinet3
estadd local Cont "Yes": Baselinet3
**# Bookmark #2  Faire tableau FE region

esttab Baselinet*  ,  	keep(laidUS L.laidUS  L2.laidUS L3.laidUS) 
	
	esttab Baselinet*  using "..\output\baselineFEreviewer.tex" ,  replace ///
	keep(laidUS L.laidUS  L2.laidUS L3.laidUS)  ///
	b(a3) se(a3) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	  substitute($ \$ ) /// /* Formatting label */
	coeflabel( ///
	   laidUS "USFPaid\$_{rt}$" ///
	L1.laidUS "USFPaid\$_{rt-1}$" ///
	L2.laidUS "USFPaid\$_{rt-2}$" ///
	L3.laidUS "USFPaid\$_{rt-3}$" ///
	) ///
	nonumber compress nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  /// /* some options on formatings */
	mtitles("(1)" "(2)" "(3)" "(4)" ) ///
	scalars("N Obs." "df_a_nested Donor-recipient pair" "widstat K-P. F-Stat" ///
	"DRFE Donor-Recipient FE" ///
	"DFE Donor-region Year FE" ///
	"Cont Controls\$_{rt-1}$")  sfmt(a3) 
	
**# Bookmark #3
preserve
		egen groupe = cut(year), at(1991(2)2021)
		collapse (sum) rmh_fp_dah_20 rmh_fp_dah_20_US (mean) instrument1 GDPpc_r pop_r poverty_r life_expectencyfe_r incidenceHIV_r HIV1549_r fert2 fertility_r adofertility_r maternalmortality_r polity2 UN_dr   FPr share_NGOUS_Obama in_s , by(groupe donor  id_o wb_location_id id_dr recipient_name id_r)
		gen laidfp = ln(rmh_fp_dah_20 + ((rmh_fp_dah_20^2 +1)^0.5))
		gen laidUS = ln(rmh_fp_dah_20_US + ((rmh_fp_dah_20_US^2 +1)^0.5))
		gen lngdppc = ln(GDPpc_r)
		gen lnpopr = ln(pop_r)
		xtset id_dr groupe
		foreach i of varlist $controls2 {
			gen `i'_int = `i' * FPr * share_NGOUS_Obama
		}
		global controls2ibis L2.lngdppc* L2.lnpopr* L2.poverty_r* L2.life_expectencyfe_r* L2.HIV1549_r* L2.incidenceHIV_r* L2.fert2* L2.fertility* L2.adofertility* L2.maternalmortality_r* L2.polity2*  
		rename laidUS laidUS2
		ivreghdfe laidfp $controls2ibis (L2.laidUS=L2.instrument1) if in_s == 1,  absorb(id_dr i.groupe##i.id_o)  cluster(recipient_name donor) first
		est store AG2
		estadd local DRFE "Yes": AG2
		estadd local DYFE "Yes": AG2
		estadd local Cont "Yes": AG2
		ivreghdfe laidfp $controls2ibis (laidUS=instrument1) if in_s == 1,  absorb(id_dr i.groupe##i.id_o)  cluster(recipient_name donor) first
		est store AG0
		estadd local DRFE "Yes": AG0
		estadd local DYFE "Yes": AG0
		estadd local Cont "Yes": AG0
	restore

**# Bookmark #2  Faire tableau aggregation ST/LT
esttab AG0 AG2  ,  	keep(laidUS2 L2.laidUS2 )  
	
	esttab AG0 AG2  using "..\output\aggregatereviewer.tex" ,  replace ///
	keep(laidUS2 L2.laidUS2)  ///
	b(a3) se(a3) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	  substitute($ \$ ) /// /* Formatting label */
	coeflabel( ///
	   laidUS "USFPaid\$_{rt/t-1}$" ///
	L2.laidUS "USFPaid\$_{rt-2/t-3}$" ///
	) ///
	nonumber compress nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  /// /* some options on formatings */
	mtitles("(1)" "(2)" ) ///
	scalars("N Obs." "df_a_nested Donor-recipient pair" "widstat K-P. F-Stat" ///
	"DRFE Donor-Recipient FE" ///
	"DYFE Donor-2Years FE" ///
	"Cont Controls\$_{rt-2}$")  sfmt(a3) 
	
**# Bookmark #1
* Bilateral reactions
	levelsof id_o, local(levelo) clean
	foreach i of local levelo {
preserve
keep if id_o == `i'
qui cap : drop laidUS`i'
di "Donor ##########################" `i'
rename laidUS laidUS`i'
qui cap : ivreghdfe laidfp $controls2i (laidUS`i'=instrument1) if  in_sam== 1 & id_o == `i' ,  absorb(id_r i.year)  cluster(recipient_name  ) first 
est store bi0l`i'
qui cap :  ivreghdfe laidfp $controls2i (L3.laidUS`i'=L3.instrument1) if  in_sam== 1 & id_o == `i' ,  absorb(id_r i.year)  cluster(recipient_name  ) first 
est store bi3l`i'
qui cap : ivreghdfe laidfp $controls2i (L.laidUS`i'=L.instrument1) if  in_sam== 1 & id_o == `i' ,  absorb(id_r i.year)  cluster(recipient_name  ) first 
est store bi1l`i'
qui cap :  ivreghdfe laidfp $controls2i (L2.laidUS`i'=L2.instrument1) if  in_sam== 1 & id_o == `i' ,  absorb(id_r i.year)  cluster(recipient_name  ) first 
est store bi2l`i'
restore
}

esttab bi0l*, drop(*) scalars("widstat K-P. F-Stat" )
esttab bi1l*, drop(*) scalars("widstat K-P. F-Stat" )
esttab bi2l*, drop(*) scalars("widstat K-P. F-Stat" )
esttab bi3l*, drop(*) scalars("widstat K-P. F-Stat" )
	
	coefplot (Baseline1 bi1l11 bi1l10 bi1l18 bi1l25 bi1l3 bi1l1 bi1l17 bi1l22 bi1l15 bi1l16 bi1l8 bi1l24 bi1l19 bi1l13 bi1l7 bi1l2 bi1l21 bi1l6 bi1l12 bi1l4 bi1l20 bi1l14 bi1l9 bi1l23 bi1l5,label(t-1) msymbol(S) mcolor(green) ciopts(lcolor(green)))	(Baseline2 bi2l*,label(t-2) msymbol(T) mcolor(ltblue) ciopts(lcolor(ltblue))) , keep(L.laidUS* L2.laidUS* ) ///*
	xline(0)  levels(90)  legend(rows(1)) ///
	graphregion( color(white)) omitted baselevels /// 
	rename( ///
	L2.laidUS1=L.laidUS1    ///
	L2.laidUS3=L.laidUS3 ///
	L2.laidUS5=L.laidUS5 ///
	L2.laidUS8=L.laidUS8 ///
	L2.laidUS10=L.laidUS10 ///
	L2.laidUS11=L.laidUS11 ///
	L2.laidUS18=L.laidUS18 ///
	L2.laidUS25=L.laidUS25 ///
	L2.laidUS2=L.laidUS2 ///
	L2.laidUS4=L.laidUS4 ///
	L2.laidUS6=L.laidUS6 ///
	L2.laidUS7=L.laidUS7 ///
	L2.laidUS9=L.laidUS9 ///
	L2.laidUS12=L.laidUS12 ///
	L2.laidUS13=L.laidUS13 ///
	L2.laidUS14=L.laidUS14 ///
	L2.laidUS15=L.laidUS15 ///
	L2.laidUS16=L.laidUS16 ///
	L2.laidUS17=L.laidUS17 ///
	L2.laidUS19=L.laidUS19 ///
	L2.laidUS20=L.laidUS20 ///
	L2.laidUS21=L.laidUS21 ///
	L2.laidUS22=L.laidUS22 ///
	L2.laidUS9=L.laidUS9 ///
	L2.laidUS23=L.laidUS23 ///
	L2.laidUS24=L.laidUS24  ///
	L2.laidUS= L.laidUS) ///
	coeflabels(L.laidUS= "{bf:All donors}" ///
	L.laidUS1="Australia" ///
	L.laidUS2="Austria" ///
	L.laidUS3="{bf:BMGF}" ///
	L.laidUS4="Belgium" ///
	L.laidUS5="Canada" ///
	L.laidUS6="China" ///
	L.laidUS7="Denmark" ///
	L.laidUS8="EU" ///
	L.laidUS9="Finland" ///
	L.laidUS10="France" ///
	L.laidUS11="{bf:Germany}" ///
	L.laidUS12="Greece" ///
	L.laidUS13="Ireland" ///
	L.laidUS14="Italy" ///
	L.laidUS15="Japan" ///
	L.laidUS16="South Korea" ///
	L.laidUS17="Luxembourg" ///
	L.laidUS18="{bf:The Netherlands}" ///
	L.laidUS19="New Zealand" ///
	L.laidUS20="Norway" ///
	L.laidUS21="Portugal" ///
	L.laidUS22="Spain" ///
	L.laidUS23="Sweden" ///
	L.laidUS24="Switzerland" ///
	L.laidUS25="{bf:United Kingdom}" 	)
	graph export "..\output\bilateralresponsereferee.eps", as(eps) preview(on) replace

		coefplot (Baseline0 bi0l11 bi0l10 bi0l18 bi0l25 bi0l3 bi0l1 bi0l17 bi0l22 bi0l15 bi0l16 bi0l8 bi0l24 bi0l19 bi0l13 bi0l7 bi0l2 bi0l21 bi0l6 bi0l12 bi0l4 bi0l20 bi0l14 bi0l9 bi0l23 bi0l5,label(t) msymbol(S) mcolor(green) ciopts(lcolor(green)))	(Baseline3 bi3l*,label(t-3) msymbol(T) mcolor(ltblue) ciopts(lcolor(ltblue))) , keep(laidUS* L3.laidUS* ) ///*
	xline(0)  levels(90)  legend(rows(1)) ///
	graphregion( color(white)) omitted baselevels /// 
	rename( ///
	L3.laidUS1=laidUS1    ///
	L3.laidUS3=laidUS3 ///
	L3.laidUS5=laidUS5 ///
	L3.laidUS8=laidUS8 ///
	L3.laidUS10=laidUS10 ///
	L3.laidUS11=laidUS11 ///
	L3.laidUS18=laidUS18 ///
	L3.laidUS25=laidUS25 ///
	L3.laidUS2=laidUS2 ///
	L3.laidUS4=laidUS4 ///
	L3.laidUS6=laidUS6 ///
	L3.laidUS7=laidUS7 ///
	L3.laidUS9=laidUS9 ///
	L3.laidUS12=laidUS12 ///
	L3.laidUS13=laidUS13 ///
	L3.laidUS14=laidUS14 ///
	L3.laidUS15=laidUS15 ///
	L3.laidUS16=laidUS16 ///
	L3.laidUS17=laidUS17 ///
	L3.laidUS19=laidUS19 ///
	L3.laidUS20=laidUS20 ///
	L3.laidUS21=laidUS21 ///
	L3.laidUS22=laidUS22 ///
	L3.laidUS9=laidUS9 ///
	L3.laidUS23=laidUS23 ///
	L3.laidUS24=laidUS24  ///
	L3.laidUS= laidUS) ///
	coeflabels(laidUS= "{bf:All donors}" ///
	laidUS1="Australia" ///
	laidUS2="Austria" ///
	laidUS3="{bf:BMGF}" ///
	laidUS4="Belgium" ///
	laidUS5="Canada" ///
	laidUS6="China" ///
	laidUS7="Denmark" ///
	laidUS8="EU" ///
	laidUS9="Finland" ///
	laidUS10="France" ///
	laidUS11="{bf:Germany}" ///
	laidUS12="Greece" ///
	laidUS13="Ireland" ///
	laidUS14="Italy" ///
	laidUS15="Japan" ///
	laidUS16="South Korea" ///
	laidUS17="Luxembourg" ///
	laidUS18="{bf:The Netherlands}" ///
	laidUS19="New Zealand" ///
	laidUS20="Norway" ///
	laidUS21="Portugal" ///
	laidUS22="Spain" ///
	laidUS23="Sweden" ///
	laidUS24="Switzerland" ///
	laidUS25="{bf:United Kingdom}" 	)
	graph export "..\output\bilateralresponsereferee2.eps", as(eps) preview(on) replace

**# Bookmark #1 Frst difference

	ivreghdfe d.laidfp $controls2i (d.laidUS =d.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baselined0
estadd local DRFE "Yes": Baselined0
estadd local DYFE "Yes": Baselined0
estadd local Cont "Yes": Baselined0
	
ivreghdfe d.laidfp $controls2i (dL1.laidUS =dL1.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baselined1
estadd local DRFE "Yes": Baselined1
estadd local DYFE "Yes": Baselined1
estadd local Cont "Yes": Baselined1
ivreghdfe d.laidfp $controls2i (dL2.laidUS =dL2.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baselined2
estadd local DRFE "Yes": Baselined2
estadd local DYFE "Yes": Baselined2
estadd local Cont "Yes": Baselined2
ivreghdfe d.laidfp $controls2i (dL3.laidUS =dL3.instrument1 ),  absorb(id_dr i.year##i.id_o)  cluster(recipient_name donor) first
est store Baselined3
estadd local DRFE "Yes": Baselined3
estadd local DYFE "Yes": Baselined3
estadd local Cont "Yes": Baselined3


esttab Baselined*, starlevels(* 0.10 ** 0.05 *** 0.01)
	esttab Baselined*  using "..\output\baseline1stdreviewer.tex" ,  replace ///
	keep(D.laidUS LD.laidUS  L2D.laidUS L3D.laidUS)  ///
	b(a3) se(a3) starlevels({$^{*}$} 0.10 {$^{**}$} 0.05 {$^{***}$} 0.01) /// /* number format and stars */
	  substitute($ \$ ) /// /* Formatting label */
	coeflabel( ///
	   laidUS "D.USFPaid\$_{rt}$" ///
	L1.laidUS "D.USFPaid\$_{rt-1}$" ///
	L2.laidUS "D.USFPaid\$_{rt-2}$" ///
	L3.laidUS "D.USFPaid\$_{rt-3}$" ///
	) ///
	nonumber compress nolines nogap title() booktabs fragment  noobs nonum nonotes collabels(none) se  /// /* some options on formatings */
	mtitles("(1)" "(2)" "(3)" "(4)" ) ///
	scalars("N Obs." "df_a_nested Donor-recipient pair"  "widstat K-P. F-Stat" ///
	"DRFE Donor-Recipient FE" ///
	"DFE Donor-region Year FE" ///
	"Cont Controls\$_{rt-1}$")  sfmt(a3) 
	